//
//  HomeThingCell.swift
//  yueshijia
//
//  Created by 王磊 on 17/4/19.
//  Copyright © 2017年 王磊. All rights reserved.
//

import UIKit

class HomeThingCell: UITableViewCell {
    @IBOutlet weak var picImage: UIImageView!

    @IBOutlet weak var nameLabel: UILabel!
    
    @IBOutlet weak var descLabel: UILabel!
    
    @IBOutlet weak var priceLabel: UILabel!
    
    @IBOutlet weak var likebtl: UIButton!
    
    var model: HomeThingCellModel?
    func setDatas(model: HomeThingCellModel) {
        
        self.nameLabel.text = model.relation_object_title
        self.priceLabel.text = model.goods_price
        self.descLabel.text = model.relation_object_jingle

    }
   
//    init(tableView : UITableView) {
//    let ID = "HomeCell"
//    var cell: HomeThingCell?
//    cell = tableView.dequeueReusableCell(withIdentifier: ID) as? HomeThingCell
//    if cell == nil {
//    cell = Bundle.main.loadNibNamed(NSStringFromClass(HomeThingCell.self), owner: nil, options: nil)?.last as! HomeThingCell?
//    
//    }
//    return cell
//    
//    }
//    required init?(coder aDecoder: NSCoder) {
//        fatalError("init(coder:) has not been implemented")
//    }
   
//    func cellWithTableView(tableView: UITableView) -> UITableViewCell {
//        let ID = "HomeCell"
//        var cell: HomeThingCell?
//        cell = tableView.dequeueReusableCell(withIdentifier: ID) as? HomeThingCell
//        if cell == nil {
//            cell = Bundle.main.loadNibNamed(NSStringFromClass(HomeThingCell.self), owner: nil, options: nil)?.last as! HomeThingCell?
//            
//        }
//        return cell!
//    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
